Color

data class Color(var r: Float = 0.0f, var g: Float = 0.0f, var b: Float = 0.0f)

An RGB color

Parameters

r

The level of red

g

The level of green

b

The level of blue

Constructors

Link copied to clipboard
constructor(r: Float = 0.0f, g: Float = 0.0f, b: Float = 0.0f)

Properties

Link copied to clipboard
var b: Float
Link copied to clipboard
var g: Float
Link copied to clipboard
var r: Float

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Checks whether two Color are equal through areClose fun.

Link copied to clipboard

Computes the luminosity of a color as

Link copied to clipboard
operator fun plus(other: Color): Color
Link copied to clipboard
operator fun times(other: Color): Color
operator fun times(scalar: Float): Color